package com.example.demo.bean;

import lombok.Getter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/*
 * @Author:大力王
 * @Date:2024/3/10-10-9:01
 * 开始了
 */
@Getter
@Component
@ConfigurationProperties(prefix = "spring.mail")
public class SprigMail {
    private String mailName;//邮箱名
    private Integer mailPassword;//邮箱密码
    private Integer mailAuthorizeCode;//授权码
    private String mailHost;//邮箱的主机名
    private String mailPort;//邮箱的端口号
    private Integer mailCode;//邮箱的验证码

    public SprigMail() {
    }

    public SprigMail(String mailName, Integer mailPassword, Integer mailAuthorizeCode, String mailHost, String mailPort, Integer mailCode) {
        this.mailName = mailName;
        this.mailPassword = mailPassword;
        this.mailAuthorizeCode = mailAuthorizeCode;
        this.mailHost = mailHost;
        this.mailPort = mailPort;
        this.mailCode = mailCode;
    }

    public void setMailName(String mailName) {
        this.mailName = mailName;
    }

    public void setMailPassword(Integer mailPassword) {
        this.mailPassword = mailPassword;
    }

    public void setMailHost(String mailHost) {
        this.mailHost = mailHost;
    }

    public void setMailPort(String mailPort) {
        this.mailPort = mailPort;
    }

    public void setMailCode(Integer mailCode) {
        this.mailCode = mailCode;
    }

    public void setMailAuthorizeCode(Integer mailAuthorizeCode) {
        this.mailAuthorizeCode = mailAuthorizeCode;
    }

    @Override
    public String toString() {
        return "SprigMail{" +
                "mailName='" + mailName + '\'' +
                ", mailPassword=" + mailPassword +
                ", mailAuthorizeCode=" + mailAuthorizeCode +
                ", mailHost='" + mailHost + '\'' +
                ", mailPort='" + mailPort + '\'' +
                ", mailCode=" + mailCode +
                '}';
    }
}
